import { BadRequestException, Body, Controller, Get, Post, Query } from '@nestjs/common';
import { ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
import { EvaluationDataService } from './evaluation-data.service';
import { EvaluationDataBatchDto } from './evaluation-data.dto';
import { EvaluationDataBatchResult } from './evaluation-data.result';

@Controller('/v1/evaluation-data')
@ApiTags('ArticleData')
export class EvaluationDataV1Controller {
  constructor(private readonly evaluationDataService: EvaluationDataService) {}

  @Post('/batch')
  @ApiOperation({ summary: '批量通过uuid来获取' })
  @ApiOkResponse({ type: EvaluationDataBatchResult,isArray: true })
  async batch(
    @Body() body: EvaluationDataBatchDto,
  ): Promise<EvaluationDataBatchResult[]> {
    const res = await this.evaluationDataService.batch(body);
    return res;
  }

}
